<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en">
<head profile="http://selenium-ide.openqa.org/profiles/test-case">
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8" />
<link rel="selenium.base" href="http://localhost:8080/Website/" />
<title>FlightStatsSC1</title>
</head>
<body>
<table cellpadding="1" cellspacing="1" border="1">
<thead>
<tr><td rowspan="1" colspan="3">FlightStatsSC1</td></tr>
</thead><tbody>
<!--Created by Steven Chow-->
<!--Scenario 1: Flight Manifest Displayed-->
<!--Test Case 1: Everything is displayed-->
<!---->
<!--Go to website-->
<tr>
	<td>open</td>
	<td>/Website/</td>
	<td></td>
</tr>
<!--Make a Reservation 1st-->
<tr>
	<td>click</td>
	<td>//div</td>
	<td></td>
</tr>
<tr>
	<td>clickAndWait</td>
	<td>css=div.tile.bg-color-red &gt; div.tile-content.icon</td>
	<td></td>
</tr>
<tr>
	<td>type</td>
	<td>name=username</td>
	<td>ReserveUser</td>
</tr>
<tr>
	<td>type</td>
	<td>name=password</td>
	<td>pass</td>
</tr>
<tr>
	<td>clickAndWait</td>
	<td>css=input[type=&quot;submit&quot;]</td>
	<td></td>
</tr>
<tr>
	<td>clickAndWait</td>
	<td>css=div.tile-content.icon &gt; img</td>
	<td></td>
</tr>
<tr>
	<td>clickAndWait</td>
	<td>css=input[type=&quot;submit&quot;]</td>
	<td></td>
</tr>
<tr>
	<td>click</td>
	<td>xpath=(//input[@name='r1'])[3]</td>
	<td></td>
</tr>
<tr>
	<td>clickAndWait</td>
	<td>css=div &gt; input[type=&quot;submit&quot;]</td>
	<td></td>
</tr>
<tr>
	<td>type</td>
	<td>name=firstName</td>
	<td>VeryCute</td>
</tr>
<tr>
	<td>type</td>
	<td>name=lastName</td>
	<td>Girl</td>
</tr>
<tr>
	<td>type</td>
	<td>name=seatID</td>
	<td>F19</td>
</tr>
<tr>
	<td>click</td>
	<td>name=mealOption</td>
	<td></td>
</tr>
<tr>
	<td>clickAndWait</td>
	<td>css=input[type=&quot;submit&quot;]</td>
	<td></td>
</tr>
<tr>
	<td>type</td>
	<td>name=credit</td>
	<td>100</td>
</tr>
<tr>
	<td>clickAndWait</td>
	<td>css=input[type=&quot;submit&quot;]</td>
	<td></td>
</tr>
<tr>
	<td>clickAndWait</td>
	<td>css=div.tile.bg-color-red &gt; div.tile-content.icon</td>
	<td></td>
</tr>
<!--Login as an Admin-->
<tr>
	<td>clickAndWait</td>
	<td>css=div.tile.bg-color-yellow &gt; div.tile-content.icon</td>
	<td></td>
</tr>
<tr>
	<td>type</td>
	<td>name=id</td>
	<td>1</td>
</tr>
<tr>
	<td>type</td>
	<td>name=password</td>
	<td>pass0</td>
</tr>
<tr>
	<td>clickAndWait</td>
	<td>css=input[type=&quot;submit&quot;]</td>
	<td></td>
</tr>
<!--Check if we are on the Manager Portal-->
<tr>
	<td>assertTitle</td>
	<td>Manager Portal</td>
	<td></td>
</tr>
<!--Check if the "Flight Statistics" Button is present-->
<tr>
	<td>assertElementPresent</td>
	<td>css=div.tile-content.icon</td>
	<td></td>
</tr>
<tr>
	<td>clickAndWait</td>
	<td>css=div.tile-content.icon</td>
	<td></td>
</tr>
<!--Check if we are on the Stats Page-->
<tr>
	<td>assertTitle</td>
	<td>Statistics</td>
	<td></td>
</tr>
<!--Check for a Flight with the reservation is there-->
<tr>
	<td>assertText</td>
	<td>//html/body/div/div[2]/div/div/div/div/form/table/tbody/tr/</td>
	<td>1003 2012-12-25 16:00 Air Canada Vancouver London 200.0 122</td>
</tr>
<tr>
	<td>assertText</td>
	<td>//html/body/div/div[2]/div/div/div/div/form/table/tbody/tr[2]/</td>
	<td>1002 2012-12-12 14:00 Air Canada Williams Lake Vancouver 200.0 122</td>
</tr>
<tr>
	<td>selectWindow</td>
	<td>null</td>
	<td></td>
</tr>
<tr>
	<td>click</td>
	<td>xpath=(//input[@name='r1'])[2]</td>
	<td></td>
</tr>
<tr>
	<td>clickAndWait</td>
	<td>name=view</td>
	<td></td>
</tr>
<!--Look for the passenger tab-->
<tr>
	<td>click</td>
	<td>link=Passengers</td>
	<td></td>
</tr>
<tr>
	<td>assertText</td>
	<td>//html/body/div/div[2]/div/div/ul/li/a</td>
	<td>Passengers</td>
</tr>
<!--Check if all info is there-->
<tr>
	<td>assertText</td>
	<td>//html/body/div/div[2]/div/div/div/div/table/tbody/tr</td>
	<td>VeryCute Girl F19 Economy Chicken</td>
</tr>
<!--Check if the Summary tab is there-->
<tr>
	<td>assertText</td>
	<td>//html/body/div/div[2]/div/div/ul/li[2]/a</td>
	<td>Summary</td>
</tr>
<tr>
	<td>click</td>
	<td>link=Summary</td>
	<td></td>
</tr>
<!--Check if everything is there-->
<tr>
	<td>assertText</td>
	<td>//html/body/div/div[2]/div/div/div/div[2]/table/tbody</td>
	<td>Air Canada Williams Lake 2012-12-12 14:00 Vancouver 2012-12-12 15:00</td>
</tr>
<tr>
	<td>assertText</td>
	<td>//html/body/div/div[2]/div/div/div/div[2]/table[2]/tbody</td>
	<td>0 0 1 1 $100.0</td>
</tr>
<tr>
	<td>assertText</td>
	<td>//html/body/div/div[2]/div/div/div/div[2]/table[3]/tbody/tr</td>
	<td>0 0 0</td>
</tr>
</tbody></table>
</body>
</html>
